import Loading from "../components/loading";
import React,{Suspense} from "react";

const HOC=(props:{href:string})=>{
    let Com=React.lazy(()=>import(`../pages${props.href}`))
    return <Suspense fallback={<Loading />}>
            <Com/>
        </Suspense>
}
export default HOC;